home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 17 / AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso / Rexx / Visage_Slideshow.dopus5_5 < prev    next >
Text File  |  1998-06-21  |  4KB  |  97 lines

  1. /* Visage_Slideshow for Directory Opus 5.5 and Visage.
  2.    by Leo 'Nudel' Davidson for Gods'Gift Utilities
  3.    email: leo.davidson@keble.oxford.ac.uk  www: http://users.ox.ac.uk/~kebl0364
  4.  
  5.  Visage is (C)1996 by Magnus Holmgren (Internet: cmh@lls.se or cmh@augs.se,
  6.  Fidonet: 2:204/204.6) and available on Aminet or from Magnus' WWW Page
  7.  (http://www.lls.se/~cmh). Many thanks to Magnus for a great picture viewer,
  8.  especially the rare random-slideshow and xpk-decrypt options.
  9.  
  10. $VER: Visage_Slideshow.dopus5 1.10 (13.6.96)
  11.  
  12.    This simple script will call "Visage" to display a slideshow of all
  13.    pictures in the source-lister's path, in random order. Optionally, a
  14.    requester will appear so that you can give it a password to xpk-decrypt the
  15.    pictures with, if required.
  16.  
  17.    To change the default amount of time pictures are displayed for, alter the
  18.    "Visage_Delay" variable below (time in seconds).
  19.  
  20.    This script has the ability to disable SwazBlanker for the duration of
  21.    the slideshow. For this to work you must have a program called "handlecx"
  22.    in your path and you must enable it by having the "DisSwaz" switch below
  23.    as "YES". If you don't run SwazBlanker or don't have handlecx, make sure
  24.    you set it to "NO" or things might not work. Users of MCP's blanker system
  25.    should replace the two occurances of 'handlecx enable "SwazBlanker"'
  26.    with 'handlecx enable "MCP"'
  27.  
  28. Call as:
  29. ------------------------------------------------------------------------------
  30. ARexx   DOpus5:ARexx/Visage_Slideshow.dopus5 {Qp} {Ql} {s} [NoPass] [<Time>]
  31. ------------------------------------------------------------------------------
  32. Turn off all switches.
  33. "[]" means this part is optional.
  34. Arguments must be given in the order shown.
  35.  
  36. NOTE: Command-line changed in v1.10
  37.  
  38. NoPass: Tells the script not to prompt for a password (no decryption).
  39. <Time>: Override the default delay-time (seconds) between pictures.
  40.  
  41. //- Path to Visage command -------------------------------------------------*/
  42. Visage_Path  = "DH0:Tools/Art/Visage"
  43. /*- Default Delay variable -------------------------------------------------*/
  44. Visage_Delay = 10
  45. /*- If you run SwazBlanker and have "handlecx" in your path, put "YES" -----*/
  46. DisSwaz = "NO"
  47. /*--------------------------------------------------------------------------*/
  48. options results
  49. options failat 99
  50. signal on syntax;signal on ioerr                /* Error trapping */
  51. parse arg DOpusPort source_handle.0 '"' source_path.0 '"' opt1 opt2 .
  52.  
  53. If DOpusPort="" THEN Do
  54.     Say "Not correctly called from Directory Opus 5!"
  55.     Say "Load this ARexx script into an editor for more info."
  56.     EXIT
  57.     END
  58. If ~Show("P",DOpusPort) Then Do
  59.     Say DOpusPort "is not a valid port."
  60.     EXIT
  61.     End
  62. Address value DOpusPort
  63.  
  64. dopus version
  65. If ( result='RESULT' | translate(result,'.',' ') < 5.1218 ) then do
  66.     lister request source_handle.0 '"This script requires DOpus v5.5 or greater." OK'
  67.     EXIT
  68.     end
  69.  
  70. Delay = Visage_Delay
  71. AskPass = "Y"
  72. If opt1~="" then do
  73.     If upper(opt1)="NOPASS" then do
  74.         AskPass = "N"
  75.         opt1 = opt2
  76.         End
  77.     If Datatype(opt1,"N") then
  78.         Delay = opt1
  79.     End
  80.  
  81. Visage_Password = ""
  82. If AskPass = "Y" then do
  83.     lister getstring source_handle.0 '"Enter password, if required" Secure 256 "" Okay|Cancel'
  84.     If DOPUSRC = 0 Then Exit
  85.     If Result ~= "" Then Visage_Password = ' PASSWORD "' || RESULT || '"'
  86.     /* Note: Result not cleared in DOpus versions < 5.5 */
  87.     End
  88.  
  89. If DisSwaz = "YES" Then Address command 'handlecx disable "SwazBlanker"'
  90.  
  91. address command Visage_Path '"'source_path.0'#?" DELAY' Delay Visage_Password "NOBUSY FOREVER QUIET RANDOM WAITFORPIC CENTRE"
  92.  
  93. If DisSwaz = "YES" Then Address command 'handlecx enable "SwazBlanker"'
  94.  
  95. syntax:;ioerr:                          /* In case of error, jump here */
  96. EXIT
  97.